package com.example.index.web;


import com.example.index.bean.User;
import com.example.index.web.impl.CloudOrderActionImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "order", fallback = CloudOrderActionImpl.class)
public interface ICloudOrderAction {

    @RequestMapping("order")
    String order();

    @GetMapping("hello")
    public String hello(@RequestParam String name);

    @GetMapping("add")
    public int add(@RequestParam int a, @RequestParam int b );

    @GetMapping("reg")
    public User reg(@RequestBody User user);

    @GetMapping("reg1")
    public User reg(@RequestBody User user,@RequestParam int age);
}
